'use strict'
require 'ng-dialog'
require 'ng-dialog-css'
require 'ng-dialog-theme-default-css'

module.exports = angular.module 'libs.utils.dialog', ['ngDialog']
.factory 'DialogService', ($log, ngDialog)->
  $log.log 'dialog service init'
  class DialogService
    constructor: ->

    notify: (data)->
      ngDialog.open
        template: require('./../../mixins/block/dialog/notify.jade')()
        plain: true
        data:
          title: data.title
          content: data.content

    confirm: (data)->
      ngDialog.openConfirm
        template: require('./../../mixins/block/dialog/confirm.jade')()
        plain: true
        data:
          title: data.title
          content: data.content

    create: (options)->
      ngDialog.open options